/**
 * ShipType.java
 */
// $codepro.audit.disable numericLiterals
package edu.gatech.startrader.ship;

import edu.gatech.startrader.universe.Universe;

/**
 * ShipType Enumerated Type
 * This is the Flyweight for the ship
 * @author Team Bamf (Team 30)
 */
public enum ShipType 
{
	/**
	 * The Flea is the cheapest ship type. 
	 * It is small, has few cargo holds, 
	 * a weak hull and no weapon, shield 
	 * or gadget slots. It is capable, however,
	 * of traveling 20 parsecs on its fuel tanks,
	 * allowing the ship to travel over great distances
	 */
	FLEA(20,50,5,0,0,0,0,2000),
	
	/**
	 * The Gnat is the default ship. 
	 * It is a suitable ship for a starting trader. 
	 * The player can carry one weapon and one gadget,
	 *  and have 15 cargo holds available. 
	 * The maximum range it can travel on one tank is 14 parsecs.
	 */
	GNAT(14,100,15,1,0,1,0,2500), 
	
	/**
	 * The Firefly is the perfect ship for a poor trader. 
	 * It is fairly cheap, has no less than 20 cargo bays, 
	 * one of each equipment type slot, and can travel up to 17 parsecs on a tank.
	 */
	FIREFLY(17,100,20,1,1,2,1,4000),
	
	/**
	 * The Mosquito is a good ship for pirating.
	 * It can travel up to 13 parsecs on a tank, has a fairly strong hull, 
	 * and can carry two weapons next to one shield and one gadget. 
	 * Its cargo holds are equal to a Gnat's.
	 */
	MOSQUITO(13,150,5,2,1,1,1,4000), 
	
	/**
	 * The Bumblebee is the stronger sister of the Firefly. 
	 * It can carry one extra shield and one extra gadget.
	 * It also has extra crew quarters available. 
	 * It can travel up to 15 parsecs on a tank.
	 */
	BUMBLEBEE(15,100,20,1,2,3,2,9500), 
	
	/**
	 * The Beetle is essentially a freighter. 
	 * It is a difficult ship to use safely with a weak hull, 
	 * no weapons, and only one shield and one gadget slot. 
	 * It has, however, no less than 50 cargo bays, three crew 
	 * quarters and can travel 14 parsecs on its fuel tanks.
	 */
	BEETLE(14,75,50,0,1,1,1,9500),
	
	/**
	 * The Hornet in the hands of pirates can make a dangerous opponent. 
	 * It has a strong hull, three weapon slots, two shield slots, one 
	 * gadget slot and two crew quarters It has 20 cargo holds to fill 
	 * with stolen goods. It can travel up to 16 parsecs on a tank.
	 */
	HORNET(16,175,20,3,2,1,2,25000),
	
	/**
	 * The Grasshopper is suitable for both pirating and honest trading. 
	 * It has 30 cargo holds, two weapon and shield slots, three gadget 
	 * slots and three crew quarters. It can travel up to 15 parsecs on one tank.
	 */
	GRASSHOPPER(15,125,30,2,2,3,3,25000), 
	
	/**
	 * The Termite is the ultimate trading ship. 
	 * It has a strong hull, three shield slots, 
	 * two gadget slots, three crew quarter.
	 * It has no less than 60 cargo holds. 
	 * Its weaknesses are its single weapon 
	 * slot and relatively short traveling 
	 * distance of only 13 parsecs.
	 */
	TERMITE(13,200,60,1,3,2,3,75000), 
	
	/**
	 * The Yellow Jacket is the ultimate pirate ship. 
	 * It has a strong hull, three weapon slots, two shield slots,
	 *  two gadget slots and three crew quarters. 
	 * It can travel up to 14 parsecs on a tank. 
	 * It is the most expensive ship. 
	 * It has 35 cargo holds.
	 */
	YELLOW_JACKET(14,250,35,3,2,2,3,150000);
	
	/**
	 * The maximum distance the ship can travel on a full tank in parsecs
	 */
	private final int range;
	
	/**
	 * The maximum amount of fuel a ship can hold
	 */
	private final int maxFuel;
	
	/**
	 * The maximum strength of the hull
	 */
	private final int maxHull;
	
	/**
	 * The base amount of space in a cargo
	 */
	private final int baseCargoSpace;
	
	/**
	 * The number of weapon slots
	 */
	private final int weaponSlots;
	
	/**
	 * The number of shield slots
	 */
	private final int shieldSlots;
	
	/**
	 * The number of gadget slots
	 */
	private final int gadgetSlots;
	
	/**
	 * The maximum number of Mercenaries the Ship Type can support
	 */
	private final int crewSize;
	
	/**
	 * The price of the ship in any planet's Shipyard
	 */
	private final int price;
	
	/**
	 * ShipType Constructor
	 * This sets up the ship with all of the attributes.
	 * @param maxRange the max range
	 * @param maxHullStrength max strength of the hull
	 * @param cargoSpace the base cargo space
	 * @param weaponSlot the number of weapon slots
	 * @param shieldSlot the number of shield slots
	 * @param gadgetSlot the number of gadget slots
	 * @param crewNum the crew size of the ship
	 * @param shipPrice  the price of the ship
	 */
	private ShipType(int maxRange, int maxHullStregth, int cargoSpace, int weaponSlot, int shieldSlot, int gadgetSlot, int crewNum, int shipPrice) { // $codepro.audit.disable largeNumberOfParameters
		range = maxRange;
		maxFuel = Universe.calculateFuelCost(maxRange);
		maxHull = maxHullStregth;
		baseCargoSpace = cargoSpace;
		weaponSlots = weaponSlot;
		shieldSlots = shieldSlot;
		gadgetSlots = gadgetSlot;
		crewSize = crewNum;
		price = shipPrice;
	}
	
	/**
	 * get price method
	 * @return this method gets the price of the ship
	 */
	public int getPrice() {
		return price;
	}
	
	/**
	 * getCrewSize method
	 * This method gets the maximum number of Mercenaries the ship can support
	 * @return the max crew size
	 */
	public int getCrewSize() {
		return crewSize;
	}
	
	/**
	 * getRange method
	 * This method gets tech maximum range the ship can travel on a full tank
	 * @return max range
	 */
	public int getRange() {
		return range;
	}
	
	/**
	 * getMaxFuel Method
	 * This method gets the maximum amount of fuel 
	 * @return max amount of fuel
	 */
	public int getMaxFuel() {
		return maxFuel;
	}
	
	/**
	 * getMaxHull method
	 * This method gets the maximum strength of the hull
	 * @return gets max strength of the hull
	 */
	public int getMaxHull() {
		return maxHull;
	}
	
	/**
	 * getBaseCargoSpace method
	 * This method gets the base cargo space for the ship
	 * @return base cargo space
	 */
	public int getBaseCargoSpace() {
		return baseCargoSpace;
	}
	
	/**
	 * getWeaponSlots method
	 * This method gets the number of weapon slots on the ship
	 * @return number of weapon slots
	 */
	public int getWeaponSlots() {
		return weaponSlots;
	}
	
	/**
	 * getShieldSlots method
	 * This method gets the number of shield slots on the ship
	 * @return number of shield slots
	 */
	public int getShieldSlots() {
		return shieldSlots;
	}
	
	/**
	 * getGadgetSlots method
	 * This method gets the number of gadget slots on the ship
	 * @return number of gadget slots 
	 */
	public int getGadgetSlots() {
		return gadgetSlots;
	}
}